<template>
  <router-view v-slot="{ Component, route }">
    <keep-alive :max="KeepAliveMax" :include="keepRoutes">
      <component :is="Component" :key="route.path" />
    </keep-alive>
  </router-view>
</template>

<script lang="ts" setup name="KeepRouterView">
import { KeepAliveMax } from '@/config'
import { useRouterStore } from '@/store/Router'
const router_store = useRouterStore()
const { keepRoutes } = storeToRefs(router_store)
</script>

<style scoped lang="scss"></style>
